<?php


class SessionFace extends FaceBase {


	/**
	 * 构造函数
	 *
	 */
	public function __construct(){
		
	}

	public function index(){
		$conf = n_api("config");
		$data = $conf->get('session');

		$memitem = new memcache();
		$memitem->connect($data['host'],$data['port']);
		$items=$memitem->getExtendedStats ('items');
		if(empty($items["{$data['host']}:{$data['port']}"]['items'])){
			throw new PException("暂无任何数据");
		}
		$items=$items["{$data['host']}:{$data['port']}"]['items'];
		
		foreach($items as $key=>$val){
			$memdata=$memitem->getExtendedStats ("cachedump",$key,0);
			$memdata = $memdata["{$data['host']}:{$data['port']}"];
			foreach($memdata as $key1=>$val1){
				$rs[$key1] = $memitem->get($key1); 
			}
		}
		face('common','header');
		$this->_html('getData',$rs);
		face('common','footer');
		
	}

	
	public function showMySession(){
		echo "<pre>";
		print_r($_SESSION);
		echo "</pre>";
	}

	//娓呴櫎鐩戞帶骞冲彴鎵€鏈夌櫥闄嗙敤鎴风殑session
	public function doClearAll(){
		//$ret = n_api("redis")->c001->clearSession();
		$this->_html("doClearAll");
	}

	
	
}


?>